The SetSpriteMediaSpriteProperty function sets the specified property of a sprite.
pascal ComponentResult SetSpriteMediaSpriteProperty (
MediaHandler mh,
short spriteIndex,
long propertyType,
void* propertyValue);
You call this function to modify a property of a sprite. You set the propertyType parameter to the property you want to modify. You set the spriteIndex parameter to the index of the sprite whose property you want to set. The index must be between one and the number of available sprites. You can determine how many sprites are available by calling CountSpriteMediaSprites .
The type of data you pass for the propertyValue parameter depends on the property type. The following table lists the sprite properties and the data types of the corresponding property values.
kSpritePropertyMatrix
|
MatrixRecord *
|
kSpritePropertyVisible
|
short
|
kSpritePropertyLayer
|
short
|
kSpritePropertyGraphicsMode
|
ModifierTrackGraphicsModeRecord *
|
kSpritePropertyImageIndex
|
short
|
The GetSpriteMediaSpriteProperty function retrieves the value of the specified sprite property.
pascal ComponentResult GetSpriteMediaSpriteProperty (
MediaHandler mh,
short spriteIndex,
long propertyType,
void* propertyValue);
You call this function to retrieve a value of a sprite property. You set the propertyType parameter to the property you want to retrieve. You set the spriteIndex parameter to the index of the sprite whose property you want to retrieve. The index must be between one and the number of available sprites. You can determine how many sprites are available by calling CountSpriteMediaSprites .
On return, the propertyValue parameter contains a pointer to the specified property's value; the data type of that value depends on the property. The following table lists the sprite properties and the data types of the corresponding property values.
kSpritePropertyMatrix
|
MatrixRecord *
|
kSpritePropertyVisible
|
short *
|
kSpritePropertyLayer
|
short *
|
kSpritePropertyGraphicsMode
|
ModifierTrackGraphicsModeRecord *
|
kSpritePropertyImageIndex
|
short *
|
The HitTestSpriteMedia function determines whether any sprites are at a specified location.
pascal ComponentResult HitTestSpriteMedia (
MediaHandler mh,
long flags,
Point loc,
short* spriteHitIndex);
You call this function to determine whether any sprites exist at a specified location in the coordinate system of a sprite track's movie. You can pass flags to this function to control the hit testing operation more precisely. For example, you may want the hit test operation to detect a sprite whose bounding box contains the specified location. The allowable flags for sprite hit testing are described in "Movie Toolbox: Sprite Toolbox."
The CountSpriteMediaSprites function retrieves the number of sprites that currently exist in a sprite track.
pascal ComponentResult CountSpriteMediaSprites (
MediaHandler mh,
short* numSprites);
The CountSpriteMediaImages function retrieves the number of images that currently exist in a sprite track.
pascal ComponentResult CountSpriteMediaImages (
MediaHandler mh,
short* numImages);
The GetSpriteMediaIndImageDescription function retrieves an image description for the specified image in a sprite track.
pascal ComponentResult GetSpriteMediaIndImageDescription (
MediaHandler mh,
short imageIndex,
ImageDescriptionHandle imageDescription);
You set the imageIndex parameter to the index of the image whose image description you want to retrieve. The index must be between one and the number of available images. You can determine how many images are available by calling CountSpriteMediaImages .
The handle specified by the imageDescription parameter must be unlocked; this function resizes the handle if necessary.
The GetDisplayedSampleNumber function retrieves the number of the sample that is currently being displayed.
pascal ComponentResult GetDisplayedSampleNumber (
MediaHandler mh,
long* sampleNum);
The QTVideoOutputGetClientName function gets the uniform resource locator (URL) for the currently displayed image for a sprite.
pascal ComponentResult SpriteMediaGetURLLink (
MediaHandler mh,
short spriteIndex,
Handle *urlLink );